import React from 'react'
import { View,
    Text, 
    ImageBackground,
    StyleSheet,
    Image
 } from 'react-native'
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler'
import '../../common/global'
import Icon from 'react-native-vector-icons/AntDesign'
const image={uri:"https://tse3-mm.cn.bing.net/th/id/OIP.Hq8ODjhUsFPtlaUuLtgj6wHaNK?pid=ImgDet&rs=1"}

const Login = ({navigation}) => {
    return (
        <ImageBackground source={image} style={styles.image}>
            <View style={styles.all}>
                <View style={styles.title}>
                    <Text style={styles.tit}>Realse</Text>
                    <Text style={styles.text}>缓&nbsp;&nbsp;解&nbsp;&nbsp;你&nbsp;&nbsp;的&nbsp;&nbsp;压&nbsp;&nbsp;力</Text>
                </View>
                <View style={styles.pos}>
                    <TouchableOpacity style={styles.btn} onPress={()=>navigation.navigate('entry')}>
                        <View style={styles.btnText}><Text style={{fontSize:17}}>登录</Text></View>
                    </TouchableOpacity>
                    <TouchableOpacity style={styles.btn} onPress={()=>navigation.navigate('register')}>
                    <View style={styles.btnText}><Text style={{fontSize:17}}>注册</Text></View>
                    </TouchableOpacity>
                </View>
            </View>
        </ImageBackground>
    )
}
const styles=StyleSheet.create({
    pos:{
        width:w-200,
        marginLeft:100,
        marginBottom:150
    },
    btn:{
        width:w-200,
        height:50,
        backgroundColor:'white',
        borderRadius:30,
        marginBottom:10,
        position:'relative'
    },
    btnText:{
        width:100,
        height:40,
        position:'absolute',
        left:'43%',
        top:'25%',
    },
    
    all:{
        width:w,
        height:h,
        backgroundColor: "rgba(0,0,0,0.2)"
    },
    title:{
        flex:1,
        alignItems:'center',
        marginTop:120
    },
    tit:{
        color:'white',
        fontSize:70,
    },
    text:{
        color:'rgb(255,255,255)',
        fontSize:18
    },
    image: {
        width:w,
        height:h,
        flex: 1,
        resizeMode: "cover",
        justifyContent:'center'
    },
})

export default Login
